package com.itheima.health.dao;


import com.itheima.health.pojo.OrderSetting;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import java.time.LocalDate;
import java.util.Date;
import java.util.List;



@Mapper
public interface OrdersettingDao {
    /**
     * 基于日历进行某天的预约设置
     *
     * @param
     * @return
     */
    List<OrderSetting> getOrderSettingByMonth(LocalDate begin, LocalDate end);

    /**
     * 根据指定日期修改可预约人数
     *
     * @param orderDate
     * @return
     */
    long findCountByOrderDate(Date orderDate);

    void editNumberByOrderDate(OrderSetting orderSetting);

    @Insert("insert into t_ordersetting(order_date, number, reservations) VALUES (#{orderDate},#{number},#{reservations})")
    void add(OrderSetting orderSetting);


}
